package main

import "fmt"

func main() {
		arrChan()

}

func arrInit(){
	var a [3]int
	var b = [...]int{1,2,3}
	var c = [...]int{4:1,2,3}
	var d = [...]int{1,2,3:6,6}
	fmt.Println("a: ", a)
	fmt.Println("b: ", b)
	fmt.Println("c: ", c)
	fmt.Println("d: " , d)
}

func arrChan(){
	c1 := make(chan [0]int)
	go func() {
		fmt.Println("c1")
		c1 <- [0]int{}
	}()
	<-c1
	fmt.Println("代码执行结束")



	c2 := make(chan struct{})
	go func() {
		fmt.Println("c2")
		c2 <- struct{}{}	// struct{}部分是类型，{}表示对应的结构值
	}()
	<- c2
}